home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Magnum One
/
Magnum One (Mid-American Digital) (Disc Manufacturing).iso
/
d18
/
vis082s.arc
/
MODEM.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1991-04-17
|
1KB
|
63 lines
Unit Modem;
Interface
{ Modem Interface for FOSSIL.PAS, Fossil Drivers }
{ Compatible with X.00 and BNU! -- TESTED with }
{ Written by: The Elemental dude }
Uses Fossil, Configrt;
Procedure SetParam (ComPort:Integer; BaudRate:LongInt; Parity:Boolean);
Procedure ClosePort;
Function NumChars:Integer;
Procedure DontAnswer;
Procedure DoAnswer;
{* Variables will give the Address of the REAL Procedure }
{* Having these to call it is SLOWER! }
Var SendChar : Procedure (K:Char);
GetChar : Function:Char;
Carrier : Function:Boolean;
Hangup : Procedure;
Implementation
Procedure SetParam (ComPort:Integer; BaudRate:LongInt; Parity:Boolean);
Var K:Char;
Begin
Case Parity of
TRUE :K:='E';
FALSE:K:='N';
End;
Set_FOSSIL (ComPort,BaudRate,8,K,1);
End;
Procedure ClosePort;
Begin
Close_FOSSIL (Configset.UseCo);
End;
Function NumChars:Integer;
Begin
NumChars:=Ord(FOSSIL_Chars);
End;
Procedure DontAnswer;
Begin
FOSSIL_Dtr (ConfigSet.UseCo,False);
End;
Procedure DoAnswer;
Begin
FOSSIL_Dtr (ConfigSet.UseCo,True);
End;
Begin
SendChar:=FOSSIL.SendChar;
GetChar:=FOSSIL.GetChar;
Carrier:=FOSSIL.FOSSIL_Carrier;
Hangup:=FOSSIL.Hangup;
End.